<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const pig = {
            name: '佩奇',
            age: 6,
        }

        const { name: uname, age } = pig
        console.log(uname);
        console.log(name);//结果为空
        console.log(age);
        const goods = {
            goodname: '小米',
            price: 1999,
        }
        const { goodname, price } = goods
        console.log(goodname);
        console.log(price);
    </script>
</body>

</html>